﻿
/*构造器重载*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp_constructor
{
    internal class Program
    {
        static void Main(string[] args)
        {
            
        }
    }

    class Calculator
    {
        public int Add(int a, int b)
        {
            return a + b;
        }

        //形参个数不同
        public int Add(int a, int b, int c)
        {
            return a + b + c;
        }

        //形参类型不同
        public double Add(double a, double b)
        {
            return a + b;
        }

        //形参种类不同
        public int Add(ref int a, int b)//out int a
        {
            a = 100;
            return a + b;
        }

    }
}
